package com.wt.admin.service.ai.impl;

import com.wt.admin.domain.dto.ai.AgentsConfigDTO;
import com.wt.admin.domain.vo.ai.*;
import com.wt.admin.service.ai.AgentsConfigService;
import com.wt.admin.service.ai.KnowledgeProxyService;
import com.wt.admin.service.ai.MCPService;
import com.wt.admin.service.ai.ModelsProxyService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AgentsConfigServiceImpl implements AgentsConfigService {

    @Resource
    private ModelsProxyService modelsProxyService;
    @Resource
    private KnowledgeProxyService knowledgeProxyService;
    @Resource
    private MCPService mcpService;

    @Override
    public AgentsConfigVO agentsConfig(AgentsConfigDTO data) {
        // 查询模型分类和模型信息
        List<ModelClassVO> modelClassVOS = modelsProxyService.getModelClassService().classList(null);
        List<ModelConfigVO> modelConfigVOS = modelsProxyService.getModelConfigService().configAll();
        // 查询知识库分类和知识库信息
        List<KnowledgeTitleVO> knowledgeClassVOS = knowledgeProxyService.getKnowledgeTitleService().titleList(null);
        // 查询所有工具
        List<MCPVO> mcpList = mcpService.getMcpList();
        return new AgentsConfigVO(modelClassVOS,modelConfigVOS,knowledgeClassVOS,mcpList);
    }


}
